<?php
$article = $this->hotel;
$hotelPrice = $this->hotelPrice;
$vctInfo = $this->vctInfo;
?>
<div style="background-color: white; width: 100%; height: auto; overflow: hidden;padding-bottom:30px;">
    <div class="top-title">
        <div class="content-title">
            <h2><?php echo $this->translate('Hotel') ?></h2>
        </div>
    </div>

    <div class="span12" id="content-left-2" style="width:700px">
        <?php if($article): ?>
        	<div class="content-left-2-title" style="width:700px;margin-left:20px; ">
        		<h4><?php echo $article['title'] ?></h4>

        	</div>
        	<!-- overview -->
        	<div style="width:94%;margin:0px 20px 0px 20px;">
        		<span><?php echo $article['overview'] ?></span>
        	</div>

        	<!-- price table -->
        	<div style="width:94%;margin:10px 20px 0px 20px;" id="price">
        	    <h4><?php echo $this->translate("Price_Table"); ?></h4>
                <table class="table tbl" border="1" style="width:100%;">
                    <thead>
                        <tr>
                            <th rowspan="2"><?php echo $this->translate('Room_catalogy'); ?></th>
                            <th colspan="3"><?php echo $this->translate('Room_rate/per_room/per_night_(USD)'); ?></th>
                            <th rowspan="2" colspan="2"><?php echo $this->translate('Validity'); ?></th>
                        </tr>
                        <tr>
                            <th><?php echo $this->translate("Single"); ?></th>
                            <th><?php echo $this->translate("Double"); ?></th>
                            <th><?php echo $this->translate("Extra-bed");?></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php if($hotelPrice): ?>
                            <?php foreach($hotelPrice as $key => $value):

                            if($value['validity_start'] != '' && Zend_Date::isDate($value['validity_start'], 'yyyy-MM-dd')) {
                                $validityStartOject  = new Zend_Date($value['validity_start'], 'yyyy-MM-dd');
                                $validityStart       = $validityStartOject->toString('yyyy-MM-dd');
                            } else {
                                $validityStart = '';
                            }
                            if($value['validity_end'] != '' && Zend_Date::isDate($value['validity_end'], 'yyyy-MM-dd')) {
                                $validityEndOject = new Zend_Date($value['validity_end'], 'yyyy-MM-dd');
                                $validityEnd      = $validityEndOject->toString('yyyy-MM-dd');
                            } else {
                                $validityEnd = '';
                            }

                            ?>
                            <tr>
                                <td  style="text-align:left"><?php echo $value['room_catalogy'] ?></td>
                                <td><?php echo $value['single']; ?></td>
                                <td><?php echo $value['double']; ?></td>
                                <td><?php echo $value['extra-bed']; ?></td>
                                <td><?php echo $validityStart; ?></td>
                                <td><?php echo $validityEnd; ?></td>
                            </tr>
                            <?php endforeach; ?>
                        <?php else: ?>
                        <tr>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
        	</div>

        	<!-- enquiry form -->
        	<div class="content-right-2-content" style="width:94%;margin:40px 0px 0px 20px;overflow:hidden;">
                <div style="text-align:center;width:100%;font-size: 18px;font-weight: bold">
                    <a href="/enquire/index/t/2/id/<?php echo $article['id']; ?>" style="text-decoration:underline;"><?php echo $this->translate("Enquiry_Now"); ?></a>&nbsp;|
                    <a href="/send-to-friend/index/t/2/id/<?php echo $article['id']; ?>" style="text-decoration:underline;"><?php echo $this->translate("Share_This_Offer"); ?></a>
                </div>
                <div style="text-align: center;margin-top:10px;">
                <?php if($vctInfo): ?>
	                <b>Contact Person</b>: <?php echo $vctInfo['contact_person'] ?><br/>
	                <b>E-Mail</b>: <a href="mailto:<?php echo $vctInfo['email_sales'] ?>"><?php echo $vctInfo['email_sales'] ?></a><br/>
	                <b>Tel</b>: <?php echo $vctInfo['tel'] ?><b> Fax</b>: <?php echo $vctInfo['fax'] ?><br/>
	                <b>Hotline</b>: <?php echo $vctInfo['hotline'] ?><br/>
	                <b>Opening Hours ( GMT+0700 )</b><br/>
	                Mon - Sat: 9:00 A.M - 6:00 P.M.<br/>
	                Sunday: 10:00 A.M - 4:00 P.M.
	           	<?php endif; ?>
                </div>
            </div>

        	<!-- detail -->
        	<div class="content-right-2-content" style="width:94%;margin-top:20px;overflow:hidden;">
                <?php echo $article['detail']; ?>
            </div>

            <!-- google map -->
            <?php if(isset($article['iframe_map']) && $article['iframe_map']): ?>
            	<div class="content-right-2-content hotel-map">
                    <h4><?php echo $this->translate("Location_map"); ?></h4>
                    <?php echo $article['iframe_map']; ?>
                </div>
            <?php endif; ?>
            <!--//end google map -->
	    <?php else: ?>
    	<div class="" style="width:700px;margin-left: 30px; ">
    		<h4><?php echo "Updating_data" ?></h4>
    	</div>
    <?php endif; ?>
    </div>
    <div class="span4" id="content-right-2" style="width:250px">
        <!-- avatar -->
        <div style="text-align:center;">
            <img src="<?php echo $article['avatar']? $article['avatar']: $article['thumbnail'] ?>" class="images-hotel" />
            <p style="margin-top: 10px">
                <b><?php echo $article['name']; ?></b><br/>
                <?php if($article['address']): ?><b>Addr</b>: <?php echo $article['address']; ?><br/><?php endif; ?>
                <?php if($article['phone']): ?><b>Phone</b>: <?php echo $article['phone']; ?><br/><?php endif; ?>
                <?php if($article['fax']): ?><b>Fax</b>: <?php echo $article['fax']; endif; ?>
            </p>
        </div>
        <!-- list images hotel -->
        <div class="list-images-hotel">
            <?php if($this->photo): ?>
                <?php foreach($this->photo as $k => $v): ?>
                    <img src="<?php echo $v['path']; ?>"  class="images-hotel" />
                <?php endforeach; ?>
            <?php endif; ?>
        </div>
    </div>
</div>

<script>
$(function() {
	i = $('.hotel-map').find('iframe').attr({width: '655px', height: '300px', style: 'border:1px solid #ddd;padding:5px', frameborder:"1", scrolling:"no", marginheight:0, marginwidth:0});
});
</script>

